package com.zhou.gof.group.singleton;

/**
 * @author zhoudong
 * @title: Singleton
 * @projectName user-app
 * @description: 饿汗式，线程安全，容易产生垃圾对象
 * @date 2019/5/29 14:52
 */
public class Singleton {
    private static Singleton singleton = new Singleton();
    private Singleton(){}
    public static Singleton getInstance(){
        return singleton;
    }

    public void msg(){
        System.out.println("单例模式-饿汗式");
    }
}
